const app = getApp();

Page({
    data: {
        user: null
    },
    onLoad: function () {
        this.setData({
            user: app.globalData.user
        });
    },
    toAnswer(){
      wx.navigateTo({
        url: '/pages/answers/answers'
      });
    },
    toCePing(){
      wx.navigateTo({
        url: '/pages/evaluation/evaluation'
      });
    },
    toUs(){
      wx.navigateTo({
        url: '/pages/aboutUs/aboutUs'
      });
    },
    toRegis(){
      wx.navigateTo({
        url: '/pages/register/register'
    });
    },
    toXiugai(){
      wx.navigateTo({
        url: '/pages/xiugaimima/xiugaimima'
    });
    },
    toZiXun(){
      wx.navigateTo({
        url: '/pages/myConsultations/myConsultations'
    });

    },
    toMyNot(){
      wx.navigateTo({
        url: '/pages/myNotifications/myNotifications'
    });
    },
  goToShouCan(){
    wx.navigateTo({
      url: '/pages/kechengshoucan/kechengshoucan'
  });
  },
  goToLogin() {
        wx.navigateTo({
            url: '/pages/login/login'
        });
    },
    logout() {
        app.globalData.user = null;
        this.setData({
            user: null
        });
    },
    onShow: function () {
        this.setData({
            user: app.globalData.user
        });
    }
});